/*
 * File: Fu_RotSpd.h
 *
 * Code generated for Simulink model 'Fu_RotSpd'.
 *
 * Model version                  : 1.738
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sun Jun 16 13:42:30 2013
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Fu_RotSpd_h_
#define RTW_HEADER_Fu_RotSpd_h_
#ifndef Fu_RotSpd_COMMON_INCLUDES_
# define Fu_RotSpd_COMMON_INCLUDES_
#include <stddef.h>
#include <string.h>
#include "rtwtypes.h"
#include "rtw_shared_utils.h"
#endif                                 /* Fu_RotSpd_COMMON_INCLUDES_ */

#include "Fu_RotSpd_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block signals (auto storage) */
typedef struct {
  uint32_T val;                        /* '<S9>/Chart' */
  boolean_T loc_FlgCalReq;             /* '<S1>/Fu_RotSpd_ModeManager' */
} BlockIO_Fu_RotSpd;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  int32_T Memory_PreviousInput;        /* '<S3>/Memory' */
  int32_T Memory_PreviousInput_j;      /* '<S6>/Memory' */
  uint16_T Memory_PreviousInput_i;     /* '<S10>/Memory' */
  uint16_T loc_cntr;                   /* '<S1>/Fu_RotSpd_ModeManager' */
  int16_T Memory_PreviousInput_n;      /* '<S5>/Memory' */
  uint8_T Memory1_PreviousInput;       /* '<S4>/Memory1' */
  uint8_T is_active_c1_Fu_RotSpd;      /* '<S9>/Chart' */
  uint8_T is_c1_Fu_RotSpd;             /* '<S9>/Chart' */
  uint8_T is_active_c2_Fu_RotSpd;      /* '<S1>/Fu_RotSpd_ModeManager' */
  uint8_T is_c2_Fu_RotSpd;             /* '<S1>/Fu_RotSpd_ModeManager' */
  boolean_T Memory_PreviousInput_a;    /* '<S7>/Memory' */
} D_Work_Fu_RotSpd;

/* Constant parameters (auto storage) */
typedef struct {
  /* Computed Parameter: Constant6_Value
   * Referenced by: '<S5>/Constant6'
   */
  uint16_T Constant6_Value[7];
} ConstParam_Fu_RotSpd;

/* Real-time Model Data Structure */
struct RT_MODEL_Fu_RotSpd {
  const char_T * volatile errorStatus;
};

/* Block signals (auto storage) */
extern BlockIO_Fu_RotSpd Fu_RotSpd_B;

/* Block states (auto storage) */
extern D_Work_Fu_RotSpd Fu_RotSpd_DWork;

/* Constant parameters (auto storage) */
extern const ConstParam_Fu_RotSpd Fu_RotSpd_ConstP;

/*
 * Exported Global Signals
 *
 * Note: Exported global signals are block signals with an exported global
 * storage class designation.  Code generation will declare the memory for
 * these signals and export their symbols.
 *
 */
extern int32_T RotSpd_HallSnsrSIHiRes; /* '<S9>/Divide1' */
extern int32_T RotSpd_HallSnsrRPMHiRes;/* '<S9>/Switch2' */
extern int16_T RotSpd_HallSnsrRPM;     /* '<S9>/Data Type Conversion1' */
extern uint16_T FuSpd_PosRot;          /* '<S3>/Data Type Conversion' */
extern uint16_T RotSpd_PosRotHallSnsr; /* '<S5>/Index Vector' */
extern uint8_T RotSpd_St;              /* '<S1>/Fu_RotSpd_ModeManager' */
extern boolean_T RotSpd_FlgRotStall;   /* '<S10>/Relational Operator' */

/* Model entry point functions */
extern void Fu_RotSpd_initialize(void);
extern void Fu_RotSpd_step(void);

/* Real-time Model object */
extern struct RT_MODEL_Fu_RotSpd *const Fu_RotSpd_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Fu_RotSpd'
 * '<S1>'   : 'Fu_RotSpd/Fu_RotSpd'
 * '<S2>'   : 'Fu_RotSpd/Fu_RotSpd/Fu_RotSpd_ModeManager'
 * '<S3>'   : 'Fu_RotSpd/Fu_RotSpd/Fu_RotSpd_RotPosIntegrator'
 * '<S4>'   : 'Fu_RotSpd/Fu_RotSpd/RotSpd_Speed'
 * '<S5>'   : 'Fu_RotSpd/Fu_RotSpd/Fu_RotSpd_RotPosIntegrator/Fu_RotSpd_PLL'
 * '<S6>'   : 'Fu_RotSpd/Fu_RotSpd/Fu_RotSpd_RotPosIntegrator/RateLimiter'
 * '<S7>'   : 'Fu_RotSpd/Fu_RotSpd/Fu_RotSpd_RotPosIntegrator/RisingEdge'
 * '<S8>'   : 'Fu_RotSpd/Fu_RotSpd/Fu_RotSpd_RotPosIntegrator/RateLimiter/RateLimiter'
 * '<S9>'   : 'Fu_RotSpd/Fu_RotSpd/RotSpd_Speed/Fu_RotSpd_CalcRotSpeed'
 * '<S10>'  : 'Fu_RotSpd/Fu_RotSpd/RotSpd_Speed/Fu_RotSpd_StallDetection'
 * '<S11>'  : 'Fu_RotSpd/Fu_RotSpd/RotSpd_Speed/Fu_RotSpd_CalcRotSpeed/Chart'
 */
#endif                                 /* RTW_HEADER_Fu_RotSpd_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
